<?php

namespace Drupal\discogs\Entity;

use Drupal\Core\Entity\Entity;
use Drupal\discogs\ReleaseInterface;

/**
 * Defines the release entity.
 *
 * @EntityType(
 *   id = "release",
 *   label = @Translation("Release"),
 *   entity_keys = {
 *     "id" = "id",
 *   },
 *   handlers = {
 *     "storage" = "Drupal\discogs\Entity\ReleaseStorage",
 *     "view_builder" = "Drupal\discogs\ReleaseViewBuilder",
 *   },
 *   links = {
 *     "canonical" = "/discogs/release/{release}",
 *   },
 *  )
 */
class Release extends Entity implements ReleaseInterface {
	public function get($property_name) {
		return isset($this->{$property_name}) ? $this->{$property_name} : NULL;
	}
}
